package huadi.concurrent.atomic;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * Created with IntelliJ IDEA.
 *
 * @author zhufeng
 *         Date: 12-7-17
 *         Time: 下午6:09
 *         To change this template use File | Settings | File Templates.
 */
class Atomic1 implements AtomicCounter {
    private AtomicInteger counter;

    public Atomic1(AtomicInteger c) {
        this.counter = c;
    }

    @Override
    public int get() {
        return counter.get();
    }

    @Override
    public void increment() {
        counter.incrementAndGet();
    }
}
